package com.phone.wxtoken;

/**
 * Created by tisen on 2017/8/29.
 */
public class TokenTest {
    private static final String APPID = "wx5625f36342c1f4c7";
    private static final String APPSECRET = "30c1f8634ee1f21247b565395a1d45a8";
    private static final String tokenUrl = "https://api.weixin.qq.com/cgi-bin/wxtoken?grant_type=client_credential" +
            "&appid=" + APPID +
            "&secret=" + APPSECRET;

    public static void main(String[] args) throws Exception {
        new TokenTest().testGetToken();
    }

    public void testGetToken() throws Exception {
        Token token = CommonUtil.getToken(APPID,APPSECRET);
        System.out.println("access_token:"+token.getAccessToken());
        System.out.println("expires_in:"+token.getExpiresIn());
    }
}
